package cn.lanqiao.dao;

import cn.lanqiao.entity.User1;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface User1Dao {
     @Insert("insert into user1 (user_name, password) values (#{userName},#{password})")
     int insert(User1 user1);
     // pageSize * (pageNum - 1)   pageSize
     @Select("select * from user1 limit #{start},#{limit}")
     List<User1> query(@Param("start") int start , @Param("limit") int limit);

     @Delete("delete form user1 where id = #{id}")
     int delete(int id);
}
